package com.example.cloud.service.system;

import com.alibaba.fastjson.JSONArray;
import com.example.cloud.model.system.Organ;
import com.example.cloud.model.system.User;

import java.util.List;

/**
 * Created by wangtao on 2018/2/3.
 */
public interface OrganService {
    JSONArray createOrganTree(List<Organ> organs);
    Organ findOneFromCache(Long id);
    Organ findRootNode();
    List<Organ> findChildren(Long parentId);
    List<Organ> findAllFromCache();
    List<Organ> getOrganList(User user, Organ organ);
    void appendName(Long id, StringBuilder name);
    void doSave(Organ organ);
    void doDelete(Long id);
    void loadCache();
}
